Optimal. Leaf size=189 \[ -\frac {1}{2} i \log ^2(1+i x) \log (-i x)+\frac {1}{2} i \log ^2(1-i x) \log (i x)+i \log (1-i x) \text {PolyLog}(2,1-i x)-i \log (1+i x) \text {PolyLog}(2,1+i x)-\frac {1}{2} i \left (\log (1-i x)+\log (1+i x)-\log \left (1+x^2\right )\right ) \text {PolyLog}(2,-i x)+\frac {1}{2} i \left (\log (1-i x)+\log (1+i x)-\log \left (1+x^2\right )\right ) \text {PolyLog}(2,i x)-i \text {PolyLog}(3,1-i x)+i \text {PolyLog}(3,1+i x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 189, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 7, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.583, Rules used = {4940, 2438,
5131, 2443, 2481, 2421, 6724} \begin {gather*} -\frac {1}{2} i \text {Li}_2(-i x) \left (-\log \left (x^2+1\right )+\log (1-i x)+\log (1+i x)\right )+\frac {1}{2} i \text {Li}_2(i x) \left (-\log \left (x^2+1\right )+\log (1-i x)+\log (1+i x)\right )-i \text {Li}_3(1-i x)+i \text {Li}_3(i x+1)+i \text {Li}_2(1-i x) \log (1-i x)-i \text {Li}_2(i x+1) \log (1+i x)+\frac {1}{2} i \log (i x) \log ^2(1-i x)-\frac {1}{2} i \log ^2(1+i x) \log (-i x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2421
Rule 2438
Rule 2443
Rule 2481
Rule 4940
Rule 5131
Rule 6724
Rubi steps
\begin {align*} \int \frac {\tan ^{-1}(x) \log \left (1+x^2\right )}{x} \, dx &=\frac {1}{2} i \int \frac {\log ^2(1-i x)}{x} \, dx-\frac {1}{2} i \int \frac {\log ^2(1+i x)}{x} \, dx+\left (-\log (1-i x)-\log (1+i x)+\log \left (1+x^2\right )\right ) \int \frac {\tan ^{-1}(x)}{x} \, dx\\ &=-\frac {1}{2} i \log ^2(1+i x) \log (-i x)+\frac {1}{2} i \log ^2(1-i x) \log (i x)+\frac {1}{2} \left (i \left (\log (1-i x)+\log (1+i x)-\log \left (1+x^2\right )\right )\right ) \int \frac {\log (1+i x)}{x} \, dx+\frac {1}{2} \left (i \left (-\log (1-i x)-\log (1+i x)+\log \left (1+x^2\right )\right )\right ) \int \frac {\log (1-i x)}{x} \, dx-\int \frac {\log (1+i x) \log (-i x)}{1+i x} \, dx-\int \frac {\log (1-i x) \log (i x)}{1-i x} \, dx\\ &=-\frac {1}{2} i \log ^2(1+i x) \log (-i x)+\frac {1}{2} i \log ^2(1-i x) \log (i x)-\frac {1}{2} i \left (\log (1-i x)+\log (1+i x)-\log \left (1+x^2\right )\right ) \text {Li}_2(-i x)+\frac {1}{2} i \left (\log (1-i x)+\log (1+i x)-\log \left (1+x^2\right )\right ) \text {Li}_2(i x)+i \text {Subst}\left (\int \frac {\log (-i (i-i x)) \log (x)}{x} \, dx,x,1+i x\right )-i \text {Subst}\left (\int \frac {\log (i (-i+i x)) \log (x)}{x} \, dx,x,1-i x\right )\\ &=-\frac {1}{2} i \log ^2(1+i x) \log (-i x)+\frac {1}{2} i \log ^2(1-i x) \log (i x)+i \log (1-i x) \text {Li}_2(1-i x)-i \log (1+i x) \text {Li}_2(1+i x)-\frac {1}{2} i \left (\log (1-i x)+\log (1+i x)-\log \left (1+x^2\right )\right ) \text {Li}_2(-i x)+\frac {1}{2} i \left (\log (1-i x)+\log (1+i x)-\log \left (1+x^2\right )\right ) \text {Li}_2(i x)-i \text {Subst}\left (\int \frac {\text {Li}_2(x)}{x} \, dx,x,1-i x\right )+i \text {Subst}\left (\int \frac {\text {Li}_2(x)}{x} \, dx,x,1+i x\right )\\ &=-\frac {1}{2} i \log ^2(1+i x) \log (-i x)+\frac {1}{2} i \log ^2(1-i x) \log (i x)+i \log (1-i x) \text {Li}_2(1-i x)-i \log (1+i x) \text {Li}_2(1+i x)-\frac {1}{2} i \left (\log (1-i x)+\log (1+i x)-\log \left (1+x^2\right )\right ) \text {Li}_2(-i x)+\frac {1}{2} i \left (\log (1-i x)+\log (1+i x)-\log \left (1+x^2\right )\right ) \text {Li}_2(i x)-i \text {Li}_3(1-i x)+i \text {Li}_3(1+i x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [F]
time = 0.54, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\text {ArcTan}(x) \log \left (1+x^2\right )}{x} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 13.26, size = 5237, normalized size = 27.71
method | result | size |
risch | \(\text {Expression too large to display}\) | \(5237\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\log {\left (x^{2} + 1 \right )} \operatorname {atan}{\left (x \right )}}{x}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\ln \left (x^2+1\right )\,\mathrm {atan}\left (x\right )}{x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________